<%@ page language="java" contentType="text/html; charset=utf-8"
    pageEncoding="utf-8"%>
    <%@taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>日志详情</title>
<link rel="stylesheet" type="text/css" href="css/css.css" />
<style type="text/css">
	#emptable td{
		font-size: 16px;
		border:none !important;
	}
	.bbD .td{
		font-size: 16px;
		text-aign:right;
	}
	.btext2 .text2{
		font-size: 16px;
		min-width:292px;
	}
	.button{
			margin-top:20px;
			font-size: 16px;
			width: 135px;
			height: 40px;
			border-radius:20px;
			border: 1px solid #ccc;
			margin-left: 35px;
			color: #fff;
			background-color: #47a4e1
	}
</style>
</style>
<script type="text/javascript" src="js/jquery.min.js"></script>
<script type="text/javascript" src="js/jquery-1.7.1.min.js" ></script>  
<script type="text/javascript" src="js/jquery.autocomplete.js"></script>  
<link   rel="stylesheet" href="css/jquery.autocomplete.css"  />  
<script type="application/javascript">  
      var names ; //定义数据  
      //开始函数  
      $().ready(function(){  
        $.ajax({  
          type:'POST',  
          contentType: "application/json",  
          url: "checkoid.do",  
          dataType: "json",  
          success:function(data){  
            names = data;  
            autocompleteFn(names);  
          }  
        });  
      });  
       //自动 补全方法  
       function autocompleteFn(names){  
         $("#autoComplete").autocomplete(names,{  
           minChars:1,  
           max: 5,  
           dataType:"json",  
           autoFill: true,  
           mustMatch: true,  
           matchContains: true,  
           scrollHeight: 220,
           formatItem: function(data, i, total) {  
             return "<I>"+data.name+"</I>";  
           },  
           formatMatch: function(data, i, total) {  
             return data.name;  
           },  
           formatResult: function(data) {  
             return data.name;  
           }  
         }).result(function(event,data){
        	 $("#oid").val(data.oid);
        	 $("#cname").html(data.cname);
        	 $("#cename").html(data.cename);
        	 $("#ctel").html(data.ctel);
        	 $("#province").html(data.province);
        	   if(data.type==1){
        		 $("#type").html("政府");
        	 }
        	 if(data.type==2){
        		 $("#type").html("学校");
        	 }
        	 if(data.type==3){
        		 $("#type").html("企业");
        	 }
        	 if(data.type==4){
        		 $("#type").html("其他");
        	 }
        	 if(data.vip==1){
        		 $("#vip").html("一般");
        	 }
        	 if(data.vip==2){
        		 $("#vip").html("重要");
        	 }
        	 if(data.vip==3){
        		 $("#vip").html("非常重要");
        	 }  
         });  
       }  
</script>  
</head>
<body>
	<div id="pageAll">
		<div class="pageTop">
			<div class="page">
				<img src="img/coin02.png" /><span><a href="main.do">首页</a>&nbsp;-&nbsp;
				<a href="#.do">日志管理</a>&nbsp;-</span>&nbsp;日志详情
			</div>
		</div>
		<div class="page ">
			<!-- 上传广告页面样式 -->
			<div class="banneradd bor">
				<form action="diary_add.do" method="post">
					<div class="baTopNo">
						<span>添加日志信息</span>
					</div>
					<div class="baBody" >
						<table id="emptable">	
							<tr class="bbD" >
								<td class="td">机构名称：</td><td ><input type="text" class="input3" id="autoComplete"/>
								<input type="hidden" name="oid" id="oid"/></td>				
							</tr>
							<tr class="bbD">
								<td class="td">机构类型：</td>
								<td><p id="type"></p></td>
							</tr>
							
							<tr class="bbD" >
								<td class="td">重要级别：</td>
								<td><p id="vip"></p></td>
							</tr>
							
							<tr class="bbD">
								<td class="td">省份：</td>
								<td><p id="province"></p></td>
							</tr>
							
							<tr class="bbD">
								<td class="td">联系人：</td><td><p id="cname"></p></td>
							</tr>
							
							<tr class="bbD">
								<td class="td">联系电话：</td><td><p id="ctel"></p></td>
							</tr>
							
							<tr class="bbD">
								<td class="td">日志所属人：</td><td><p id="cename"></p></td>
							</tr>
							<!-- <tr class="bbD">
								<td class="td">产品状态：</td><td><input class="input3"type="text" /></td>
							</tr> -->
							<tr class="bbD">
								<td class="td">日志等级：</td>
								<td>
									<select class="input3" name="diarylevel">
										<option value="1">一般日志</option>
										<option value="2">重要日志</option>
										<option value="3">无效日志</option>
									</select>
								</td>
							</tr>
							<tr class="bbD">
								<td class="td">日志内容：</td>
								<td class="btext2">
									<textarea class="text2" name="content"></textarea>
								</td>
							</tr>
							
							<tr class="bbD">
								<td class="td">日志状态：</td>
								<td>
									<select class="input3" name="delstate">
										<option value="0">可用</option>
										<option value="1">不可以</option> 
									</select>
								</td>	
							</tr>
							<tr class="bbD">
								<td class="td">审核状态：</td>
								<td>
									<select class="input3" name="checkstate">
										<option value="1">未审核</option>
										<option value="2">审核中</option>
										<option value="3">已审核</option>
									</select>
								</td>	
							</tr>
						</table>
							<input class="button" type="submit" value="确定" id="empinfoupdate"/>							
					</div>
				</form>		
			</div>

		</div>
	</div>
</body>
</html>